package com.investmenttechnologyservices.services;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AdminService {
	
	// api/admin/getGridSetup/<gridType>
	public List<Map<String, Object>> getGridSetup(String gridType) {
		return getFields();
	}
	
	List<Map<String, Object>> getFields() {
		List<Map<String, Object>> ret = new ArrayList<Map<String,Object>>();
		ret.add(createField("id1", "header1", "path1", 500));
		ret.add(createField("id2", "header2", "path2", 500));
		ret.add(createField("id3", "header3", "path3", 500));
		ret.add(createField("id4", "header4", "path4", 500));
		return ret;
	}

	private Map<String, Object> createField(String id, String header, String path, int width) {
		Map<String, Object> entity = new HashMap<String, Object>();
		entity.put("id", id);
		entity.put("name", header);
		entity.put("field", path);
		entity.put("width", width);
		return entity;
	}

	
}
